package com.bridge.applets.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bridge.applets.mapper.BridgeNeuralNetworkMapper;
import com.bridge.applets.model.entity.BridgeIdentifyCae;
import com.bridge.applets.model.entity.BridgeNeuralNetwork;
import com.bridge.applets.service.BridgeNeuralNetworkService;
import com.bridge.common.enums.YesOrNoEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xyjian
 * @since 2024-11-06
 */
@Service
public class BridgeNeuralNetworkServiceImpl extends ServiceImpl<BridgeNeuralNetworkMapper, BridgeNeuralNetwork> implements BridgeNeuralNetworkService {

    @Override
    public BridgeNeuralNetwork queryById(Long relationNeuralNetworkId) {
        return this.lambdaQuery()
                .eq(BridgeNeuralNetwork::getId,relationNeuralNetworkId)
                .eq(BridgeNeuralNetwork::getIsDeleted, YesOrNoEnum.NO.getType())
                .one();
    }

    @Override
    public List<BridgeNeuralNetwork> queryByIds(List<Long> ids) {
        return this.lambdaQuery()
                .in(BridgeNeuralNetwork::getId,ids)
                .eq(BridgeNeuralNetwork::getIsDeleted, YesOrNoEnum.NO.getType())
                .list();
    }
}
